#ifndef __OROLE_ACTION_H__
#define __OROLE_ACTION_H__

class oRoleSwitch: public oAction
{
public:
	oRoleSwitch(oUnit* owner);
	virtual ~oRoleSwitch();
	virtual void update( ccTime dt );
	virtual void stop();
	virtual void run();
	virtual bool isAvailable();
	void onAnimationEnd(oModel* model, uint32 index);
private:
	int _switchAnimationIndex;
};

class oRoleStrike: public oAction
{
public:
	oRoleStrike(oUnit* unit);
	virtual ~oRoleStrike();
	virtual void run();
	virtual void update( ccTime dt );
	virtual void stop();
	void onAnimationEnd(oModel* model, uint32 index);
private:
	int _hitAnimationIndex;
};

class oVillyAttack: public oAttack
{
public:
	oVillyAttack(oUnit* unit);
	void run();
	virtual void update(ccTime dt);
	static oAction* create(oUnit* unit);
	bool onHitTarget(oBullet* bullet, oUnit* target);
protected:
	virtual void onAttack();
	float _attackDelay1;
	int _attackType;
	static string _looks[4];
};

#endif